﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Keepo.Models
{
    public class Album
    {
        public int AlbumId { get; set; }

        [MaxLength(60)]
        public string Title { get; set; }

        public int NumOfPages { get; set; }
        public int NumOfCopies { get; set; }

        public int OrderNum { get; set; }

        public int PaperId { get; set; }
        public virtual Paper Paper { get; set; }

        public DateTime DueDate { get; set; }

        public int AlbumStatusId { get; set; }
        public virtual AlbumStatus AlbumStatus { get; set; }

        public int AlbumLockStatusId { get; set; }
        public virtual AlbumLockStatus AlbumLockStatus { get; set; }

        public string StudioNotes { get; set; }

        public int AlbumSizeId { get; set; }
        public virtual AlbumSize AlbumSize { get; set; }

        [ForeignKey("SalesMan")]
        public int? SalesManId { get; set; }
        public virtual User SalesMan { get; set; }

        [ForeignKey("Editor")]
        public int? EditorId { get; set; }
        public virtual User Editor { get; set; }

        public bool HasPhotographer { get; set; }
        public bool IncludeGraphics { get; set; }
        public int IntroPagesNumber { get; set; }
        public bool IsOneSided { get; set; }

        public bool HasRender { get; set; } //whether this album has been changed since the last Render process
        public bool IsRemoved { get; set; }

        public DateTime CreatedDate { get; set; }

        public virtual ICollection<AlbumSection> AlbumSections { get; set; }

        public virtual ICollection<FilmingDay> FilmingDays { get; set; }

        public virtual ICollection<AlbumPrintVersion> AlbumPrintVersions { get; set; }
    }
}